<?php

define('IN_VANILLA', 1);
define(
	'TEST_DIR',
	str_replace('\\', '/', dirname(__File__))
);
define(
	'LOWCALVANILLA_DIR',
	str_replace('\\', '/', TEST_DIR . '/_files/extensions/LowCalVanilla')
);

$Configuration = array();
$Configuration['LIBRARY_PATH'] = TEST_DIR . '/library/';
$Configuration['LOWCALVANILLA_DIR'] = LOWCALVANILLA_DIR;
$Configuration['APPLICATION_PATH'] = TEST_DIR . '/_files/';
$Configuration['LOWCALVANILLA_CACHE_DIR'] = TEST_DIR . '/_files/cache/';
$Configuration['LOWCALVANILLA_CACHE_EXT'] = '.cache';
$Configuration['LOWCALVANILLA_GZIP_ALLOWED'] = '1';
$Configuration['LOWCALVANILLA_PACKER_ENABLE'] = '1';
$Configuration['LOWCALVANILLA_EXPIRE'] = '86400';
$Configuration['LOWCALVANILLA_VERSION'] = 'test';
$Configuration['LOWCALVANILLA_CONF_DIR'] = LOWCALVANILLA_DIR . '/conf/';
$Configuration['WEB_ROOT'] = '/';
$Configuration['LOWCALVANILLA_ROOT'] = '/extensions/LowCalVanilla/';


class TestContext {
	var $Configuration;
	var $WarningCollector;
	var $DelegateCollection = array();
	var $PassThruVars = array();

	function TestContext() {
		global $Configuration;
		$this->Configuration = $Configuration;
		$this->WarningCollector = new TestWarningCollector();
	}
}

class TestWarningCollector {
	var $Error = array();

	function Add($Error) {
		$this->Error[] = $Error;
	}
}

require_once(TEST_DIR . '/../tools/simpletest/unit_tester.php');
require_once(TEST_DIR . '/../tools/simpletest/reporter.php');
require_once(TEST_DIR . '/library/Framework/Framework.Functions.php');
require_once(TEST_DIR . '/library/Framework/Framework.Class.Delegation.php');
require_once(TEST_DIR . '/library/Framework/Framework.Class.Control.php');
require_once(TEST_DIR . '/library/Framework/Framework.Control.Head.php');
require_once(TEST_DIR . '/../src/library/Functions.php');
require_once(TEST_DIR . '/../src/library/Class.File.php');
require_once(TEST_DIR . '/../src/library/Class.MergedFiles.php');
require_once(TEST_DIR . '/../src/library/Class.Cache.php');
require_once(TEST_DIR . '/../src/library/Class.FileToServe.php');
require_once(TEST_DIR . '/../src/tools/utilities.php');
require_once(TEST_DIR . '/../src/tools/Control.CleanUp.php');